﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DelonixRegiaHMSys.Core.Services;
using DelonixRegiaHMSys.Infrastructure.Data;

namespace DelonixRegiaHMSys.UI.WebForms
{
    public partial class GuestParticulars : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
           
        }

        protected void btngpnext_Click(object sender, EventArgs e)
        {
            string GuestID = lblguestID.Text;
            string GuestLastName = tbxguestLastName.Text;
            string GuestFirstName = tbxguestFirstName.Text;
            string HomeAddress = tbxHomeAddress.Text;
            string Nationality = ddlnationality.SelectedValue;
            int ContactNumber = Convert.ToInt32(tbxcontactNum.Text);
            string EmailAddress = tbxemailAddress.Text;
            string MailAddress = tbxmailAddress.Text;

            var gpservice = new gpServices(new EfGuestParticularQuery());
            gpservice.AddGuest(GuestID, GuestLastName, GuestFirstName, HomeAddress, Nationality, ContactNumber, EmailAddress, MailAddress);
            Response.Redirect("~/WebForms/RetrieveGuestParticular.aspx", true);
        }
    }
}